package recommend.map;

import org.apache.flink.api.common.functions.MapFunction;
import recommend.client.MysqlClient;
import recommend.entity.ProductEntity;

public class DataLoaderMapFunction implements MapFunction<ProductEntity, ProductEntity> {
    @Override
    public ProductEntity map(ProductEntity productEntity) throws Exception {
        System.out.println(productEntity);
        if(productEntity != null) {
            MysqlClient.putData(productEntity);
        }
        return productEntity;
    }
}

